﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 影片售票系统
{
    public partial class zhuxiao : Form
    {
        public zhuxiao()
        {
            InitializeComponent();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            chakan from = new chakan();
            from.Show();
        }

        private void zhuxiao_Load(object sender, EventArgs e)
        {
            label1.BackColor = Color.Transparent;
            label2.BackColor = Color.Transparent;
            label3.BackColor = Color.Transparent;
            label4.BackColor = Color.Transparent;
            label5.BackColor = Color.Transparent;
            label6.BackColor = Color.Transparent;
            linkLabel1.BackColor = Color.Transparent;
        }

        private void button1_Click(object sender, EventArgs e)
        { 
            string name = this.textBox1.Text.Trim();
            string zsxm = this.textBox2.Text.Trim();
            string mima = this.textBox3.Text.Trim();
            
            DialogResult na = MessageBox.Show("您确定要注销吗？", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
            if (na == DialogResult.OK)
            {
                string sql = string.Format("delete from YH_1 WHERE zsxm = '{0}'",zsxm);
                int rs = common.DBHelper.write(sql);

                if (rs > 0)
                {
                    MessageBox.Show("注销成功");

                }
                else
                {
                    MessageBox.Show("注销失败");
                }
            }
        }
    }
}
